toLocalIsoString() vs toIsoString()

70

toLocalIsoString() vs toIsoString() -

var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
var localISOTime = (new Date(Date.now() - tzoffset)).toISOString().slice(0, -1);
// => '2015-01-26T06:40:36.181'

Comments

Submit
0 Comments